<template>
	<div class="box" style="width: 100%;height: 430px;float: left;margin: 10px 0;">
	 <div class="d1" style="margin-left: 0;width: 100%;height: 500px;">
				<el-card class="box-card" style='border-top: 3px solid deepskyblue;'>
					<div slot="header" class="clearfix">
						<i class="el-icon-time"></i>
						<span>考试成绩统计&nbsp;&nbsp;<i class="el-icon-refresh" @click="kscj()"></i></span>
						<router-link to="/educa/kscjtj">
						    <el-button style="float: right; padding: 3px 0" type="text">更多</el-button>
					    </router-link>
					</div>
				    <template>
						<el-table :data="kscjdataList" stripe style="width: 100%">
							<el-table-column align="center" prop="bjmc" label="班级名称" width="">
							</el-table-column>
							<el-table-column align="center" prop="lsmc" label="老师名称" width="">
							</el-table-column>
							<el-table-column align="center" prop="ksls" label="考试类型" width="">
							</el-table-column>
							<el-table-column align="center" prop="avgs" label="平均成绩" width="">
							</el-table-column>
							<el-table-column align="center" prop="alls" label="总成绩" width="">
							</el-table-column>
							<el-table-column align="center" prop="mins" label="最低成绩" width="">
							</el-table-column>
							<el-table-column align="center" prop="maxs" label="最高成绩" width="">
							</el-table-column>
							<el-table-column align="center" prop="step1cnt" label="大于平均分的人数" width="">
							</el-table-column>
							<el-table-column align="center" prop="allcnt" label="总人数" width="">
							</el-table-column>
							<el-table-column align="center" prop="tbfx" label="同比分析" width="">
							</el-table-column>
						</el-table>
						<!-- 分页查询区域 -->
						<!--<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageindex" :page-sizes="pagesizes" :page-size="pagesize" :layout="layout" :total="total" class="class-page">
						</el-pagination>-->
					</template>
				</el-card>
			</div>
			</div>
</template>
<script type="text/javascript">
//	import Homeysbjlist from '../../view/admin/yushebjManage/add'
	export default {
//		components: { Homeysbjlist },
		data() {
			return {
				toggle: false,
			    kscjdataList:[],//考试成绩
				layout: 'total, sizes, prev, pager, next, jumper', //组件布局
				pageindex: this.$store.state.pageindex, //当前分页页码
				pagesizes: this.$store.state.pagesizes, //显示个数的选择器选项
				pagesize: this.$store.state.pagesize, //每页显示条目数
				total: 0, //总条数

				layout: 'total, sizes, prev, pager, next, jumper', //组件布局
				pageindex1: 1, //当前分页页码
				pagesizes1: [4], //显示个数的选择器选项
				pagesize1: 4, //每页显示条目数
				total: 0, //总条数
			}
		},
		created() {
		   this.kscj();
		},
		methods: {
			tableCellControl(scope) { //表格单元格控制CSS样式
				// console.log(scope)
				if(scope.column.property == "zt") {
					return {
						color: "green",
					}
				} else {
					return {
						color: "red",
					}
				}
			},
			kscj() {
				var logininfo = JSON.parse(localStorage.logininfo);
				this.axios.get(this.$store.state.api + 'ksscoretj/list', {
					params: {
                        yhid:logininfo.id,
                      xxid:logininfo.xxid,
                      pageindex: this.pageindex,
                      pagesize: this.pagesize
					}
				}).then(res => {
					console.log(res)
					let data = res.data.data;
					let list = data.list;
					this.total = data.totalPage;
					this.kscjdataList = list;
				}).catch(res => {
					console.log(res)
				})
			},
			handleSizeChange(val) { //每页显示条数触发事件
				this.pagesize1 = val;
				this.pageindex1 = 1;
				this.kscj();
			},
			handleCurrentChange(val) { //分页触发事件
				this.kscj();
			},
		}
	}
</script>
<style lang="less" scoped>
.text {
		font-size: 14px;
	}

	.item {
		margin-bottom: 18px;
	}

	.clearfix:before,
	.clearfix:after {
		display: table;
		content: "";
	}

	.clearfix:after {
		clear: both
	}

	.box-card {
		width: 100%;
		height: 100%;
	}

	.el-carousel__item h3 {
		color: #475669;
		font-size: 14px;
		opacity: 0.75;
		/*    line-height: 280px;*/
		margin: 0;
		text-align: center;
	}

	.el-carousel__item:nth-child(2n) {
		background-color: white;
	}

	.el-carousel__item:nth-child(2n+1) {
		background-color: lightyellow;
	}

	.class-page {
		margin-top: 5px;
	}
	/*日历*/

	#calendar {
		width: 95%;
		margin: 0 auto;
		box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
	}

	.month {
		width: 100%;
		background: #00B8EC;
	}

	.month ul {
		margin: 0;
		padding: 0;
		display: flex;
		justify-content: space-between;
	}

	.year-month {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-around;
	}
	.year-month:hover {
		background: rgba(150, 2, 12, 0.1);
	}

	.choose-year {
		padding-left: 20px;
		padding-right: 20px;
	}

	.choose-month {
		text-align: center;
		font-size: 1.5rem;
	}

	.arrow {
		padding: 30px;
	}

	.arrow:hover {
		background: rgba(100, 2, 12, 0.1);
	}

	.month ul li {
		color: white;
		font-size: 20px;
		text-transform: uppercase;
		letter-spacing: 3px;
	}

	.weekdays {
		margin: 0;
		padding: 10px 0;
		background-color: #00B8EC;
		display: flex;
		flex-wrap: wrap;
		color: #FFFFFF;
		justify-content: space-around;
	}

	.weekdays li {
		display: inline-block;
		width: 13.6%;
		text-align: center;
	}

	.days {
		padding: 0;
		background: #FFFFFF;
		margin-top: 10px;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-around;
	}

	.days li {
		list-style-type: none;
		display: inline-block;
		width: 14.2%;
		text-align: center;
		padding-bottom: 15px;
		padding-top: 15px;
		font-size: 1rem;
		color: #000;
	}

	.days li .active {
		padding: 6px 10px;
		border-radius: 50%;
		background: #00B8EC;
		color: #fff;
	}

	.days li .other-month {
		padding: 5px;
		color: gainsboro;
	}

	.days li:hover {
		background: #e1e1e1;
	}
</style>
